home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2002 November / SGI Freeware 2002 November - Disc 3.iso / dist / fw_plotutils.idb / usr / freeware / catman / u_man / cat1 / ode.Z / ode
Encoding:
Text File  |  2002-01-08  |  9.1 KB  |  265 lines

  1.  
  2.  
  3.  
  4. ODE(1)              GNU Plotting Utilities           ODE(1)
  5.  
  6.  
  7. NNAAMMEE
  8.        ode  -  numerical  solution of ordinary differential equa
  9.        tions
  10.  
  11. SSYYNNOOPPSSIISS
  12.        ooddee [ _o_p_t_i_o_n_s ] [ _f_i_l_e ]
  13.  
  14. DDEESSCCRRIIPPTTIIOONN
  15.        ooddee is a    tool that solves, by numerical    integration,  the
  16.        initial    value  problem    for  a specified system    of first-
  17.        order ordinary  differential  equations.      Three     distinct
  18.        numerical     integration     schemes    are    available:
  19.        Runge-Kutta-Fehlberg  (the  default),  Adams-Moulton,  and
  20.        Euler.    The  Adams-Moulton  and     Runge-Kutta  schemes are
  21.        available with adaptive step size.
  22.  
  23.        The operation of    ooddee is specified by a program, written in
  24.        its  input  language.   The  program  is     simply    a list of
  25.        expressions for the derivatives of  the    variables  to  be
  26.        integrated,  together  with some    control    statements.  Some
  27.        examples    are given in the EEXXAAMMPPLLEESS section.
  28.  
  29.        ooddee reads the program from the  specified  file,     or  from
  30.        standard     input if no file name is given.  If reading from
  31.        standard    input, ooddee will    stop reading  and  exit     when  it
  32.        sees a single period on a line by itself.
  33.  
  34.        At  each     time  step, the values    of variables specified in
  35.        the program are written to standard output.  So a table of
  36.        values will be produced,    with each column showing the evo
  37.        lution of a variable.  If there are only    two columns,  the
  38.        output can be piped to ggrraapphh(1) or a similar plotting pro
  39.        gram.
  40.  
  41. OOPPTTIIOONNSS
  42.    IInnppuutt OOppttiioonnss
  43.        --ff _f_i_l_e
  44.        ----iinnppuutt--ffiillee _f_i_l_e
  45.           Read input from _f_i_l_e before reading  from     standard
  46.           input.   This  option  makes  it    possible  to work
  47.           interactively, after  reading  a    program     fragment
  48.           that  defines the    system of differential equations.
  49.  
  50.    OOuuttppuutt OOppttiioonnss
  51.        --pp _p_r_e_c
  52.        ----pprreecciissiioonn _p_r_e_c
  53.           When printing numerical results, use _p_r_e_c     signifi
  54.           cant  digits (the    default    is 6).    If this    option is
  55.           given, the print format will  be    scientific  nota
  56.           tion.
  57.  
  58.        --tt
  59.        ----ttiittllee
  60.           Print  a    title  line  at     the  head of the output,
  61.  
  62.  
  63.  
  64. FSF                 Dec 1998                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ODE(1)              GNU Plotting Utilities           ODE(1)
  71.  
  72.  
  73.           naming the  variables  in     each  column.     If  this
  74.           option  is  given,  the print format will    be scien
  75.           tific notation.
  76.  
  77.    IInntteeggrraattiioonn SScchheemmee OOppttiioonnss
  78.        The following options specify  the  numerical  integration
  79.        scheme.     Only  one  of the three basic options --RR, --AA, --EE
  80.        may    be    specified.        The        default    is     --RR
  81.        (Runge-Kutta-Fehlberg).
  82.  
  83.        --RR _[_s_t_e_p_s_i_z_e_]
  84.        ----rruunnggee--kkuuttttaa _[_s_t_e_p_s_i_z_e_]
  85.           Use  a  fifth-order Runge-Kutta-Fehlberg algorithm,
  86.           with an adaptive stepsize    unless a  constant  step
  87.           size  is    specified.   When  a constant stepsize is
  88.           specified    and no error analysis is requested,  then
  89.           a     classical  fourth-order  Runge-Kutta  scheme  is
  90.           used.
  91.  
  92.        --AA _[_s_t_e_p_s_i_z_e_]
  93.        ----aaddaammss--mmoouullttoonn _[_s_t_e_p_s_i_z_e_]
  94.           Use a fourth-order Adams-Moulton    predictor-correc
  95.           tor scheme, with an adaptive stepsize unless a con
  96.           stant  stepsize,    _s_t_e_p_s_i_z_e,  is    specified.    The
  97.           Runge-Kutta-Fehlberg  algorithm is used to get past
  98.           `bad' points (if any).
  99.  
  100.        --EE _[_s_t_e_p_s_i_z_e_]
  101.        ----eeuulleerr _[_s_t_e_p_s_i_z_e_]
  102.           Use a `quick and dirty' Euler scheme, with  a  con
  103.           stant  stepsize.     The default value of _s_t_e_p_s_i_z_e is
  104.           0.1.  Not    recommended for    serious    applications.
  105.  
  106.           The error    bound options --rr and --ee    (see  below)  may
  107.           not be used if --EE    is specified.
  108.  
  109.        --hh _h_m_i_n _[_h_m_a_x_]
  110.        ----sstteepp--ssiizzee--bboouunndd _h_m_i_n _[_h_m_a_x_]
  111.           Use a lower bound    _h_m_i_n on    the stepsize.  The numer
  112.           ical scheme will not  let     the  stepsize    go  below
  113.           _h_m_i_n.   The  default  is    to  allow the stepsize to
  114.           shrink to    the  machine  limit,  i.e.,  the  minimum
  115.           nonzero double-precision floating    point number.
  116.  
  117.           The  optional argument _h_m_a_x, if included,    specifies
  118.           a    maximum    value for the stepsize.     It is useful  in
  119.           preventing  the  numerical  routine  from     skipping
  120.           quickly over an interesting region.
  121.  
  122.    EErrrroorr BBoouunndd OOppttiioonnss
  123.        --rr _r_m_a_x _[_r_m_i_n_]
  124.        ----rreellaattiivvee--eerrrroorr--bboouunndd _r_m_a_x _[_r_m_i_n_]
  125.           The --rr option sets an upper bound    on  the     relative
  126.           single-step  error.   If the --rr option is    used, the
  127.  
  128.  
  129.  
  130. FSF                 Dec 1998                2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ODE(1)              GNU Plotting Utilities           ODE(1)
  137.  
  138.  
  139.           relative single-step error in any     dependent  vari
  140.           able  will never exceed _r_m_a_x (the    default    for which
  141.           is 10^-9).  If this should occur,    the solution will
  142.           be  abandoned and    an error message will be printed.
  143.           If the stepsize is not constant, the stepsize  will
  144.           be  decreased `adaptively', so that the upper bound
  145.           on the single-step error is  not    violated.   Thus,
  146.           choosing    a  smaller upper bound on the single-step
  147.           error will cause smaller stepsizes to be chosen.    A
  148.           lower  bound  _r_m_i_n  may optionally be specified, to
  149.           suggest when the stepsize    should be increased  (the
  150.           default for _r_m_i_n is _r_m_a_x/1000).
  151.  
  152.        --ee _e_m_a_x _[_e_m_i_n_]
  153.        ----aabbssoolluuttee--eerrrroorr--bboouunndd _e_m_a_x _[_e_m_i_n_]
  154.           Similar  to --rr, but bounds the absolute rather than
  155.           the relative single-step error.
  156.  
  157.        --ss
  158.        ----ssuupppprreessss--eerrrroorr--bboouunndd
  159.           Suppress the ceiling on single-step error, allowing
  160.           ooddee  to  continue    even if    this ceiling is    exceeded.
  161.           This may result in large numerical errors.
  162.  
  163.    IInnffoorrmmaattiioonnaall OOppttiioonnss
  164.        ----hheellpp Print a list of command-line options, and    exit.
  165.  
  166.        ----vveerrssiioonn
  167.           Print the    version    number of ooddee  and  the     plotting
  168.           utilities    package, and exit.
  169.  
  170. DDIIAAGGNNOOSSTTIICCSS
  171.        Mostly self-explanatory.     The biggest exception is `syntax
  172.        error', meaning there is    a  grammatical    error.     Language
  173.        error messages are of the form
  174.  
  175.           ooddee:: nnnnnn::    mmeessssaaggee......
  176.  
  177.        where `nnn' is the number of the    input line containing the
  178.        error.  If the --ff option    is used, the phrase "(file)" fol
  179.        lows  the  `nnn'     for  errors encountered inside    the file.
  180.        Subsequently, when ooddee begins reading the standard  input,
  181.        line numbers start over from 1.
  182.  
  183.        No  effort  is made to recover successfully from    syntactic
  184.        errors in the input.  However, there is a meager    effort to
  185.        resynchronize  so  more than one    error can be found in one
  186.        scan.
  187.  
  188.        Run-time    errors elicit a    message    describing  the     problem,
  189.        and the solution    is abandoned.
  190.  
  191. EEXXAAMMPPLLEESS
  192.        The program
  193.  
  194.  
  195.  
  196. FSF                 Dec 1998                3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. ODE(1)              GNU Plotting Utilities           ODE(1)
  203.  
  204.  
  205.           yy'' == yy
  206.           yy    == 11
  207.           pprriinntt tt,, yy
  208.           sstteepp 00,, 11
  209.  
  210.        solves  an  initial value problem whose solution    is _y_=_e_^_t.
  211.        When ooddee    runs this program, it will write two  columns  of
  212.        numbers to standard output.  Each line will show    the value
  213.        of the independent variable _t, and the variable _y, as _t is
  214.        stepped from 0 to 1.
  215.  
  216.        A more sophisticated example would be
  217.  
  218.           ssiinnee'' == ccoossiinnee
  219.           ccoossiinnee'' ==    --ssiinnee
  220.           ssiinnee == 00
  221.           ccoossiinnee == 11
  222.           pprriinntt tt,, ssiinnee
  223.           sstteepp 00,, 22**PPII
  224.  
  225.        This  program solves an initial value problem for a system
  226.        of two differential equations.  The initial value  problem
  227.        turns  out  to  define the sine and cosine functions.  The
  228.        program steps the system    over a full period.
  229.  
  230. AAUUTTHHOORRSS
  231.        ooddee was written by Nicholas B.  Tufillaro  (nnbbtt@@rreeeedd..eedduu),
  232.        and  slightly  enhanced    by Robert S. Maier (rrssmm@@mmaatthh..aarrii
  233.        zzoonnaa..eedduu) to merge it into the GNU plotting utilities.
  234.  
  235. SSEEEE AALLSSOO
  236.        "The GNU    Plotting Utilities Manual".
  237.  
  238. BBUUGGSS
  239.        Email bug reports to bbuugg--ggnnuu--uuttiillss@@ggnnuu..oorrgg.
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262. FSF                 Dec 1998                4
  263.  
  264.  
  265.